home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / include / incl98.zoo / errno.h < prev    next >
C/C++ Source or Header  |  1993-12-01  |  5KB  |  141 lines

  1. #ifndef _ERRNO_H
  2. #define _ERRNO_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define    ENOERR          0        /* no error */
  13. #define E_OK          ENOERR    /*  "   "   */
  14. #define    EERROR          1        /* generic error */
  15.  
  16. #define    EDRNRDY          2        /* drive not ready */
  17. #define EDRVNR          EDRNRDY    /*   "    "    "   */
  18. #define    EUKCMD          3        /* unknown command */
  19. #define EUNCMD          EUKCMD    /*    "      "     */
  20. #define    ECRC          4        /* crc error */
  21. #define E_CRC          ECRC        /*  "   "    */
  22. #define    EBADREQ          5        /* bad request */
  23. #define EBADRQ          EBADREQ    /*  "    "     */
  24. #define    ESEEK          6        /* seek error */
  25. #define E_SEEK          ESEEK        /*   "    "   */
  26. #define    EUKMEDIA      7        /* unknown media */
  27. #define EMEDIA          EUKMEDIA    /*    "     "    */
  28. #define    ESECTOR          8        /* sector not found */
  29. #define ESECNF          ESECTOR    /*    "    "   "    */
  30. #define    EPAPER          9        /* no paper */
  31. #define    EWRITE         10        /* write fault */
  32. #define EWRITEF         EWRITE        /*   "     "   */
  33. #define    EREAD         11        /* read fault */
  34. #define EREADF         EREAD        /*  "     "   */
  35. #define    EGENERIC     12        /* general mishap */
  36. #define    EROFS         13        /* write protect */
  37. #define    ECHMEDIA     14        /* media change */
  38. #define E_CHNG         ECHMEDIA    /*   "     "    */
  39.  
  40. #define    EUKDEV         15        /* unknown device */
  41. #define EUNDEV         EUKDEV        /*    "      "    */
  42. #define ENODEV         EUKDEV        /*    "      "    */
  43. #define    EBADSEC         16        /* bad sectors */
  44. #define EBADSF         EBADSEC    /*  "    "     */
  45. #define    EIDISK         17        /* insert disk */
  46. #define EOTHER         EIDISK        /*    "    "   */
  47.                     /* (gap) */
  48. #define    EINVAL         32        /* invalid function number */
  49. #define    ENOENT         33        /* file not found */
  50. #define ESRCH         ENOENT        /* pid not found */
  51. #define ECHILD         ENOENT        /* no children (wait/waipid) */
  52. #define    EPATH         34        /* path not found */
  53. #define ENOTDIR         EPATH
  54. #define    EMFILE         35        /* no more handles */
  55. #define    EACCESS         36        /* access denied */
  56. #define    EACCES         36        /* access denied */
  57. #define EPERM         EACCESS    /*    "      "   */
  58. #define    EBADF         37        /* invalid handle */
  59. #define    ENOMEM         39        /* insufficient memory */
  60. #define    EFAULT         40        /* invalid memory block address */
  61. #define    ENXIO         46        /* invalid drive spec */
  62. #define    EXDEV         48        /* cross device rename */
  63. #define    ENMFILES     49        /* no more files (fsnext) */
  64. #define ENMFIL         49        /* no more files (from fsnext) */
  65.  
  66. #define ELOCKED         58        /* locking conflict */
  67.  
  68. #define    EBADARG         64        /* range error/context unknown */
  69. #define    EINTERNAL     65        /* internal error */
  70. #define EINTRN         EINTERNAL    /*    "       "   */
  71. #define    ENOEXEC         66        /* invalid program load format */
  72. #define EPLFMT         ENOEXEC    /*     "      "      "    "    */
  73. #define    ESBLOCK         67        /* set block failed/growth restraints*/
  74. #define EGSBF         ESBLOCK    /* or memory block growth failure */
  75.                     /* (gap) */
  76. # define EMLINK         80        /* too many symbolic links */
  77. # define ELOOP         EMLINK
  78. #define EPIPE         81        /* write to broken pipe */
  79. # define EEXIST         85        /* file exists, try again later */
  80. # define ENOTEMPTY     EEXIST
  81. # define ENAMETOOLONG      86        /* name too long */
  82. # define ENOTTY         87
  83. # define ERANGE         88
  84. # define EDOM         89
  85. #define EIO         90        /* I/O error */
  86. #define ENOSPC         91        /* disk full */
  87.  
  88. #define EINTR            128        /* this *should* be fake */
  89.  
  90. #ifdef __MINT__
  91.  
  92. /* Network error numbers -- only useful with Kay Roemer's socket library */
  93.  
  94. #define _NE_BASE 300
  95.  
  96. #define    ENOTSOCK    (_NE_BASE + 0)    /* Socket operation on non-socket */
  97. #define    EDESTADDRREQ    (_NE_BASE + 1)    /* Destination address required */
  98. #define    EMSGSIZE    (_NE_BASE + 2)    /* Message too long */
  99. #define    EPROTOTYPE    (_NE_BASE + 3)    /* Protocol wrong type for socket */
  100. #define    ENOPROTOOPT    (_NE_BASE + 4)    /* Protocol not available */
  101. #define    EPROTONOSUPPORT    (_NE_BASE + 5)    /* Protocol not supported */
  102. #define    ESOCKTNOSUPPORT    (_NE_BASE + 6)    /* Socket type not supported */
  103. #define    EOPNOTSUPP    (_NE_BASE + 7)    /* Operation not supported */
  104. #define    EPFNOSUPPORT    (_NE_BASE + 8)    /* Protocol family not supported */
  105. #define    EAFNOSUPPORT    (_NE_BASE + 9)    /* Address family not supported by
  106.                         protocol */
  107. #define    EADDRINUSE    (_NE_BASE + 10)    /* Address already in use */
  108. #define    EADDRNOTAVAIL    (_NE_BASE + 11)    /* Cannot assign requested address */
  109. #define    ENETDOWN    (_NE_BASE + 12)    /* Network is down */
  110. #define    ENETUNREACH    (_NE_BASE + 13)    /* Network is unreachable */
  111. #define    ENETRESET    (_NE_BASE + 14)    /* Network dropped conn. because of
  112.                         reset */
  113. #define    ECONNABORTED    (_NE_BASE + 15)    /* Software caused connection abort */
  114. #define    ECONNRESET    (_NE_BASE + 16)    /* Connection reset by peer */
  115. #define    EISCONN        (_NE_BASE + 17)    /* Socket is already connected */
  116. #define    ENOTCONN    (_NE_BASE + 18)    /* Socket is not connected */
  117. #define    ESHUTDOWN    (_NE_BASE + 19)    /* Cannot send after shutdown */
  118. #define    ETIMEDOUT    (_NE_BASE + 20)    /* Connection timed out */
  119. #define    ECONNREFUSED    (_NE_BASE + 21)    /* Connection refused */
  120. #define    EHOSTDOWN    (_NE_BASE + 22)    /* Host is down */
  121. #define    EHOSTUNREACH    (_NE_BASE + 23)    /* No route to host */
  122. #define    EALREADY    (_NE_BASE + 24)    /* Operation already in progress */
  123. #define    EINPROGRESS    (_NE_BASE + 25)    /* Operation now in progress */
  124. #define EWOULDBLOCK    (_NE_BASE + 26)    /* Operation would block */
  125.  
  126. #define _NE_MAX        EWOULDBLOCK
  127.  
  128. #endif
  129.  
  130. #ifndef AssemB
  131. extern    int    errno;
  132. extern    int    sys_nerr;
  133. extern    char *    sys_errlist[];
  134. #endif /* AssemB */
  135.  
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139.  
  140. #endif /* _ERRNO_H */
  141.